import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: 'Statistics',
        name: 'Statistics',
        component: () => import(/* webpackChunkName: "Statistics" */ '../views/Statistics.vue')
      },
      {
        path: 'StuList',
        name: 'StuList',
        component: () => import(/* webpackChunkName: "StuList" */ '../views/StuList.vue')
      },
      {
        path: 'Permissions',
        name: 'Permissions',
        component: () => import(/* webpackChunkName: "Permissions" */ '../views/Permissions.vue')
      },
      {
        path: 'AddData',
        name: 'AddData',
        component: () => import(/* webpackChunkName: "AddData" */ '../views/AddData.vue')
      },
      {
        path: 'Config',
        name: 'Config',
        component: () => import(/* webpackChunkName: "Config" */ '../views/Config.vue')
      }
    ]
  },
  {
    path: '/403',
    name: '403',
    component: () => import(/* webpackChunkName: "403" */ '../views/403.vue')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
